'use strict';
 const db = uniCloud.database();

exports.main = async (event, context) => {
  //event为客户端上传的参数
  // console.log('event : ' + event)
	const collection_users = db.collection('users');
	let _id=event.buyer_id;
	let res=await collection_users.doc(_id).get()
	let msg={
		"address":res.data[0].address,
		"user_name":res.data[0].user_name,
		"phone":res.data[0].phone
	}

  //返回数据给客户端
  return {status:2,"msg":msg}
};

